import React, { lazy, Suspense } from 'react'
import ReactDOM from 'react-dom/client'
// import App from './App'
import { BrowserRouter, HashRouter, Routes, Route } from 'react-router-dom'
// import Login from './pages/Login'

// const Reg = lazy(() => import('./pages/Reg'))
// const Home = lazy(() => import('./pages/Home'))
// const Test = lazy(() => import('./pages/Test'))
// const Student = lazy(() => import('./pages/Student'))
import Router from './router/index'

ReactDOM.createRoot(document.getElementById('root')).render(
  // <React.StrictMode>
  // <App />
  // </React.StrictMode>
   <BrowserRouter>
          <Router></Router>
   </BrowserRouter>
  // <BrowserRouter>
  //   <Routes>
  //     <Route path='/home/*' element={

  //       <Suspense fallback={<div>加载中...</div>}>
  //         <Home />

  //       </Suspense>}>

  //       <Route path='test' element={
  //         <Test></Test>
  //       }></Route>
  //       <Route path='stu' element={
  //         <Student></Student>
  //       }></Route>

  //     </Route>

  //     <Route path='/login' element={<Login />}></Route>
  //     <Route path='/reg' element={<Suspense fallback={<div>加载中...</div>}>
  //       <Reg></Reg>
  //     </Suspense>}></Route>

  //   </Routes>
  // </BrowserRouter>
)
